package svc

import "github.com/go-session/session"

const (
	sessUIDKey = "user_id"
	sessOrgKey = "enterprise_id"
)

func setUID(s session.Store, uid string) {
	s.Set(sessUIDKey, uid)
}
func getUID(s session.Store) (string, bool) {
	tmp, ok := s.Get(sessUIDKey)
	if !ok {
		return "", false
	}
	return tmp.(string), true
}

func setOrgID(s session.Store, orgid string) {
	s.Set(sessOrgKey, orgid)
}
func getOrgID(s session.Store) (string, bool) {
	tmp, ok := s.Get(sessOrgKey)
	if !ok {
		return "", false
	}
	return tmp.(string), true
}
